home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Games Collection 1
/
software vault.zip
/
software vault
/
CDR10
/
MAPEDIT.ZIP
/
PAINT.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-05-13
|
2KB
|
91 lines
#include <dos.h>
#include <bios.h>
#include <stdio.h>
#include <malloc.h>
#include <process.h>
#define scrptr (char far *)0xA0000000
#define sign(x) ((x) > 0 ? 1: ((x) == 0 ? 0: (-1)))
#define plot(x,y,color) *(scrptr+((long)(y)*(long)(320))+(long)(x)) = color
#define xplot(x,y,color) *(scrptr+((long)(y)*(long)(320))+(long)(x)) ^= color
typedef char BOOL; /* Boolean flag */
BOOL save_pcx(char *fname,char far * buffer);
char far *bufptr;
int lcol,mcol,rcol;
struct pal_struct{
unsigned char red;
unsigned char green;
unsigned char blue;
}
pal[256];
struct character_attribute_struct{
unsigned int block :4;
unsigned int door_jump_to :5;
}* ca;
pch(int px,int py,unsigned int outchar);
int far *escr;
int far *mapptr;
unsigned int cchar;
char far *animptr;
char csptr[256][8][8];
unsigned int tbar;
unsigned char cvis;
unsigned int screen[1000];
#define NORMAL_MODE 0
#define EDIT_MODE 1
#define COPY_MODE 2
#define DEST_MODE 3
#define DRAW_MODE 4
#define TOP_BLOCK 1
#define BOTTOM_BLOCK 2
#define LEFT_BLOCK 4
#define RIGHT_BLOCK 8
#define ALL_BLOCK 15
int mouseon;
int mousex,mousey,mouseb,oldb; /* 1 = 1 pixel */
int chy; /* 1 = 1 character */
int mapx, mapy; /* 1 = 1 character */
int current_mode;
int numfiles;
char filename[256][20];
FILE *fptr;
union REGS inmregs;
union REGS outmregs;
#define mousecursor(a) {if (a) inmregs.x.ax=1; else inmregs.x.ax=2; int86(0x33,&inmregs,&outmregs);}
struct db_info {
int num_sprites;
char dummy[1000];
}db;
struct sprite_struct {
int width;
int height;
FILE * start;
int xs;
int ys;
char *pict;
char name[20];
char dummy[20];
}si[100];
char mapname[64];
char charsetname[64];